package com.kalaqia.wechat.pay.di;

import android.content.Context;

import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

import dagger.Module;
import dagger.Provides;

/**
 * function:
 * project:PayModule
 * describe:
 * created owner:kalaqia 421407393@qq.com
 * created date:2017/9/1 10:57
 */
//<editor-fold desc="version update log">
// updare owner:kalaqia  421407393@qq.com
// update datetime:2017/9/1 10:57 
// update remark:
//</editor-fold>
@Module
public class WeChatPayModule {

    private Context context;

    public WeChatPayModule(Context context) {
        this.context = context;
    }

    @Provides
    public void providePayTask() {
        IWXAPI msgApi = WXAPIFactory.createWXAPI(context, null);
        // 将该app注册到微信
        msgApi.registerApp("wxd930ea5d5a258f4f");
    }

}
